From: Magnus Manske Date: Tue, 24 Feb 2004 12:01:43 +0000 (+0000) Subject: Categories workover, incomplete X-Git-Tag: 1.3.0beta1~954 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=dbb89d2e6ad948c6a05ee1805950d151709ced58;p=lhc%2Fweb%2Fwiklou.git Categories workover, incomplete --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 12e2c334ec..4c2ed2ea37 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -996,6 +996,7 @@ $t[] = "" ; $image = Namespace::getImage(); $special = Namespace::getSpecial(); $media = Namespace::getMedia(); + $category = wfMsg ( "category" ) ; $nottalk = !Namespace::isTalk( $wgTitle->getNamespace() ); if ( $wgLang->linkPrefixExtension() && preg_match( $e2, $s, $m ) ) { @@ -1078,6 +1079,16 @@ $t[] = "" ; $s .= $prefix . "" . $text . "" . $trail; continue; } + if ( $ns == $category && $wgUseCategoryMagic ) { + $t = explode ( ":" , $nt->getText() ) ; + array_shift ( $t ) ; + $t = implode ( ":" , $t ) ; + $t = $wgLang->ucFirst ( $t ) ; + $t = $sk->makeKnownLink( $category.":".$t, $t, "", $trail , $prefix ); + $this->mCategoryLinks[] = $t ; + $s .= $prefix . $trail ; + continue ; + } if( $ns == $media ) { $s .= $prefix . $sk->makeMediaLinkObj( $nt, $text ) . $trail; $wgLinkCache->addImageLinkObj( $nt );